<!--{template header}-->
<style>
.product_detail_cnt img{display:block;width:650px;}
.product_detail_cnt p{margin-bottom: 0px;}

</style>
<link href="templates/meituan/styles/meituan.css" rel="stylesheet" type="text/css" />
{~ui('loader')->js('@time.lesser')}
<div class="site-ms">
<div class="bread-nav">{eval ui('catalog')->tree($product['category'])}</div>    
<div class="deal_component">
<h3>{$product['name']}<p>{$product['intro']}</p></h3>                  
<div class="deal-tile__cover">
<div class="deal-tile__cover_img">
{eval ui('iimager')->multis($product['id'], $product['imgs'])}
</div>
</div>            
<div class="deal-tile__c">                
<div class="price"><em>&yen; {$product['nowprice']} </em><sub>&yen; {$product['price']}</sub><span>{$product['discount']}折</span></div>             
<div class="detail-B_box">                
<b class="B">
{if $product['type'] == 'prize'}
<span>{echo logic('prize')->allCount($product['id'])}</span>人已参加抽奖
{if $product['time_remain'] < 0}
{if logic('prize')->PrizeWIN($product['id'])}
<div>
已开奖
<br/>
<a href="?mod=prize&code=view&pid={$product['id']}">查看中奖号码</a>
</div>
{else}
<div>未开奖</div>
{/if}
{/if}
{else}
{if $product['is_countdown'] == 1}
{if $product['maxnum']==0 }
剩余<em>999</em>份
{else}
{eval $product['num'] = $product['maxnum'] - $product['sells_count'];}
{if $product['num']<1}
已售完
{else}
剩余<em>{$product['num']}</em>份
{/if}
{/if}
{else}
已售出<em>{$product['sells_count']}</em>份
{/if}
，<em>{$product['succ_buyers']}</em>人已购买 
{/if}
</b>                    
<b class="B T">
{if $product['begin_date']}
即将到来：<span>{$product['begin_date']}</span>
{elseif $product['limit_time']}
开抢倒计时：<div class="deal_djs" id="remainTime_{$product['id']}"></div>
<script language="javascript">
addTimeLesser($product['id'], $product['limit_time']);
</script>
{else}
剩余时间：{if $product['time_remain'] < 0}<span>0</span>{/if}
<div class="deal_djs" id="remainTime_{$product['id']}"></div>
<script language="javascript">
addTimeLesser($product['id'], $product['time_remain']);
</script>
{/if}
</b>
{if $product['time_remain'] < 0}
<p class="txt12">下次请赶早！</p>
{else}
{if $product['surplus']<=0}
<p class="txt12">下次请赶早！</p>
{else}
<p class="txt12">数量有限，行动要快哦！<i class="B3">{if $favorited && MEMBER_ID > 0}已收藏{elseif MEMBER_ID > 0}<a id="favorite" href="javascript:void(0);" tourl="?mod=me&code=favorite&op=add&id={$product['id']}" onclick="addfavorite()">点击收藏</a>{/if}</i></p>
{if $product['succ_remain']<=0}
<p class="txt12">{TUANGOU_STR}成功,仍可继续购买</p>
{else}
<p class="txt12">
达成{TUANGOU_STR}还需{$product['succ_remain']}人，
{if meta('p_ir_'.$product['id'])}<a href="{eval echo $this->Config[site_url]; }/?u={MEMBER_ID}" onclick="copyText(this.href);">邀请朋友一起买，返利{ini:product.default_payfinder}元</a>{/if}
</p>
{/if}
{/if}
{/if}
</div>
{if $product['time_remain'] < 0}
<div class="deal_o">
<a href="javascript:void(0)">
<div class="jieshu">已结束</div>
</a>
</div>
{else}	
{if $product['surplus']>0}
<div class="deal_b">
{if $product['type'] == 'prize'}
<a href="?mod=buy&code=checkout&id={$product['id']}">
<div class="choujiang" >立即抽奖</div>
</a>
{else}
{if $product['maxnum']>0 && $product['surplus']<=0}
<a href="javascript:;"><div class="buypro">已经售罄</div></a>
{elseif $product['begin_date'] || $product['limit_time']}
<a href="javascript:;"><div class="buypro">即将开始</div></a>
{else}
<a href="?mod=buy&code=checkout&id={$product['id']}"><div class="buypro">立即抢购</div></a>
{/if}
{/if}
</div>
{else}
<div class="deal_y">
已售完
</div>
{/if} 
{/if} 
<div class="datail_shop" style="display:none;">
<a id="favorite" class="shop_cart">购物车</a>
{if $product['surplus']>0}
{if $favorited && MEMBER_ID > 0}<a class="shop_fav" href="javascript:void(0);" title="已收藏">已收藏</a>{elseif MEMBER_ID > 0}<a id="favorite" class="shop_fav" href="javascript:void(0);" tourl="?mod=me&code=favorite&op=add&id={$product['id']}" onclick="addfavorite()"  title="收藏">收藏</a>{/if}
{/if}
</div>  
<div class="like_share_this" style="padding-bottom:0;">
{eval app('bshare')->load('product_detail', array('product'=>$product))}
</div>
</div>
</div>
<div class="site-ms__left">    
<div class="t_area_out">
<div class="t_area_in">
<h5 class="detail-centit">商家的其他{TUANGOU_STR}</h5>
<!--{eval $data = logic('product')->GetOwnerList($product['sellerid'],5)}-->
<!--{loop $data $product2}-->
<!--{if $product2['id']!=$product['id']}-->
<p>
<b class="oc_price">&yen;{$product2['nowprice']}</b>
<a target="_blank" href="?view={$product2['id']}">{$product2['name']}</a>
<span class="mb_0626" id="tuanState" style="float:right;"><b>{$product2['sells_count']}</b>人已购买</span>
</p>
<!--{/if}-->
<!--{/loop}-->
</div>
</div>
<div class="t_area_out">
<div class="content-navbar" id="content-navbar-id">
<ul>
{if !meta('p_hs_'.$product['id'])}
<li class="name-cur"><span id="name-address">商家位置</span></li>
<script type="text/javascript">
$("#name-address").click(function() {
$(this).parent("li").nextAll().removeClass("name-cur");
$(this).parent("li").addClass("name-cur");
document.getElementById("name-address-block").scrollIntoView();
})
</script>
{/if}
<li {if meta('p_hs_'.$product['id'])}class="name-cur"{/if}><span id="name-product-detail" >{TUANGOU_STR}详情</span></li>
<li><span id="name-comment">用户评价</span></li>
</ul>
<script type="text/javascript">
if(!($.browser.msie && $.browser.version<7)){
document.write('<script type="text/javascript" src="./js/side_follow.js"><'+'/script>');
}
$("#name-product-detail").click(function(){
$(this).parent("li").nextAll().removeClass("name-cur");
$(this).parent("li").prevAll().removeClass("name-cur");
$(this).parent("li").addClass("name-cur");
document.getElementById("name-product-detail-block").scrollIntoView();
})
$("#name-comment").click(function() {
$(this).parent("li").prevAll().removeClass("name-cur");
$(this).parent("li").addClass("name-cur");
document.getElementById("name-comment-block").scrollIntoView();
})
</script>
<div class="content-navbar_buy">
{if $product['time_remain'] < 0}
<a href="javascript:void(0)"><div class="buy-end">已结束</div></a>
{else}	
{if $product['surplus']>0}
<div class="cj_or_bp">
{if $product['type'] == 'prize'}
<a href="?mod=buy&code=checkout&id={$product['id']}">
<div class="landb-now" >立即抽奖</div>
</a>
{else}
{if $product['maxnum']>0 && $product['surplus']<=0}
<a href="javascript:;"><div class="landb-now" >已经售罄</div></a>
{elseif $product['begin_date'] || $product['limit_time']}
<a href="javascript:;"><div class="landb-now">即将开始</div></a>
{else}
<a href="?mod=buy&code=checkout&id={$product['id']}"><div class="landb-now" >立即抢购</div></a>
{/if}
{/if}
</div>
{else}
{/if} 
{/if}
</div>
<div style="clear:both;"></div>
</div>
<script type="text/javascript">
if(!($.browser.msie && $.browser.version<7)){
$("#content-navbar-id").fixbox({distanceToBottom:200,threshold:8});
}
</script>
<div class="mainbox">
<div class="main">
<!-- {~ui('loader')->js('@product.detail')} -->
{if !meta('p_hs_'.$product['id'])}
<a class="detail-centit" id="name-address-block">
<span>商家地址</span>
</a>
<div class="position-wrapper">
<div class="address-list">
{eval $sellermap = $product['sellermap']}
{if $sellermap[0]!=''}
<script type="text/javascript" src="http://api.go2map.com/maps/js/api_v2.0.js"></script>
<script type="text/javascript"> 
var map, marker;
function map_initialize()
{
var location = new sogou.maps.Point('{$sellermap[0]}', '{$sellermap[1]}');
var mapOptions = {
zoom: parseInt('{$sellermap[2]}'),
center: location,
mapTypeId: sogou.maps.MapTypeId.ROADMAP,
mapControl: false
};
map = new sogou.maps.Map(document.getElementById("map_canvas"), mapOptions);
marker = new sogou.maps.Marker({
map: map,
position: location,
title: "{$product['sellername']}"
});
}
</script>
<div class="left-content">
<div id="map_canvas">
<div style="padding:1em; color:gray;">正在载入...</div>
</div>
<a id="img1" class="img2"><div class="map_big">查看完整地图</div></a>
</div>
{/if}
<div class="biz-wrapper" style="float:left;">
<h1>{$product['sellername']}</h1>
<ul style="margin-top:15px;font-size:12px;">
<li class="com_adr">
<div><strong>地址：</strong>{$product['selleraddress']}</div>
<div><strong>电话：</strong>{$product['sellerphone']}</div>
<a href="{$product['sellerurl']}" target="_blank">{$product['sellerurl']}</a>
</li>
</ul>
</div>
{if $sellermap[0]!=''}
<script type="text/javascript">
$(document).ready(function() {
$("#img1").click(function() {
window.open('http://map.sogou.com/#c={$sellermap[0]},{$sellermap[1]},{$sellermap[2]}');
});
<!--{if $sellermap[0]!=''}-->
map_initialize();
<!--{/if}-->
});
</script>
{/if}
</div>
<div style="clear:both;"></div>
</div>
{/if}
<a class="detail-centit" id="name-product-detail-block">
<span>{TUANGOU_STR}详情</span>
</a>
<div id="product_detail_area">
<h4>【本单详情】</h4>
<!-- <Script type="text/javascript">
$("#t_detail_txt img").each(function(){
if($(this).width() > $(this).parent().width()) {
$(this).width("100%");
}});
</Script> -->

<div id="product_detail_cnt" class="product_detail_cnt">{$product['content']}</div>
{if $product['cue']}
<h4>【特别提示】</h4>
<div class="product_detail_cnt">{$product['cue']}</div>
{/if}
{if $product['theysay']}
<h4>【他们说】</h4>
<div class="product_detail_cnt">{$product['theysay']}</div>
{/if}
{if $product['wesay']}
<h4>【我们说】</h4>
<div class="product_detail_cnt">{$product['wesay']}</div>
{/if}
</div>
<a class="detail-centit" id="name-comment-block">
<span>用户评价</span>
</a>
<!--{eval logic('comment')->show_summary($product['id'])}-->
</div>
<div class="deal-buy-bottom">
<div class="price">&yen;{$product['nowprice']}</div>
<table>
<tbody>
<tr>
<th>市场价</th>
<th>折扣</th>
<th>已{TUANGOU_STR}</th>
</tr>
<tr>
<td><span>&yen;</span><del>{$product['price']}</del></td>
<td>{$product['discount']}折</td>
<td>
{if $product['type'] == 'prize'}
{echo logic('prize')->allCount($product['id'])}
{else}
{$product['succ_buyers']}
{/if}
人
</td>
</tr>
</tbody>
</table>
<div class="btn—wrapper">
{if $product['time_remain'] < 0}
<div><a href="javascript:void(0)"><div class="js">已结束</div></a></div>
{else}	
{if $product['surplus']>0}
<div class="cj_or_bp">
{if $product['type'] == 'prize'}
<a href="?mod=buy&code=checkout&id={$product['id']}">
<div class="cj" >立即抽奖</div>
</a>
{else}
<a href="?mod=buy&code=checkout&id={$product['id']}">
<div class="bp" >立即抢购</div>
</a>
{/if}
</div>
{else}
<div style="float:right;">
<img src="templates/default/images/new/maiguangle.png">
</div>
{/if} 
{/if}
</div>
</div>
</div>
</div>
</div>
<div class="site-ms__right">
<!--{~ui('widget')->load('index_detail')}-->
<div class="t_area_out ">
<h1>看了本{TUANGOU_STR}的用户还看了</h1>
<div class="t_area_in">
<ul class="product_list">
{eval $cpid = isset($_GET['view']) ? $_GET['view'] : -1;}
{eval $one_product =  logic('product')->GetOne($cpid);}
{eval $product_other_list = logic('product')->GetOtherList($one_product['city'], $one_product['category'], $one_product['id'], 10);}
{loop  $product_other_list $i $product}
<li>
<p ><a href="?view={$product['id']}"><img src="{echo imager($product['imgs'][0], IMG_Small);}" width="220" height="145"/></a></p>
<p class="name"><a href="?view={$product['id']}">{$product['name']}</a></p>
<div class="shop">
<div class="pr">
<font class="price">&yen;{$product['nowprice']}</font>
<font class="markprice">&nbsp;市场价：&yen;{$product['price']}</font>
</div>
<div class="gotosee"><a href="?view={$product['id']}">去看看</a></div>
<div style="clear:both;"></div>
</div>
</li>
{/loop}
</ul>
</div>
</div>

</div>
</div>
<!--{template footer}-->